cmake_minimum_required(VERSION 3.15)
project(TRTyolo)

set(CMAKE_CXX_STANDARD 17)

find_package(OpenCV REQUIRED)
find_package(TensorRT REQUIRED)
find_package(CUDA REQUIRED)

set(ENGINE_SRC
    engine.cpp
)

include_directories(${OpenCV_INCLUDE_DIRS} ${TensorRT_INCLUDE_DIRS})

add_library(trt_engine ${ENGINE_SRC})

add_executable(
    main
    src/main.cpp
    src/engine.cpp 
)

target_link_libraries(main
    ${TensorRT_LIBRARIES}
    ${CUDA_LIBRARIES}
    ${OpenCV_LIBS}
)

target_include_directories(trt_engine PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/../../include
)

